package test;

/**
 * @author 郝文雪
 * @date 2022/9/1 19:54
 * @Description Test
 */
public class bilibili1 {
    public int cal_words_num (String sentences) {
        // write code here
        if(sentences.length()==0) return 0;
        int count=0;
        String[] words=sentences.split(" ");
        for(String word:words){
            count++;
        }
        return count;
    }
}
